package com.dianping.cat.consumer.all.config.entity;

import com.dianping.cat.consumer.all.config.BaseEntity;
import com.dianping.cat.consumer.all.config.IVisitor;
import java.util.LinkedHashMap;
import java.util.Map;

public class AllConfig
  extends BaseEntity<AllConfig> {
/* 10 */   private Map<String, Report> m_reports = new LinkedHashMap();






/* 17 */   public void accept(IVisitor visitor) { visitor.visitAllConfig(this); }


  public AllConfig addReport(Report report) {
/* 21 */     this.m_reports.put(report.getId(), report);
/* 22 */     return this;
  }


  public boolean equals(Object obj) {
/* 27 */     if (obj instanceof AllConfig) {
/* 28 */       AllConfig _o = (AllConfig)obj;

/* 30 */       if (!equals(getReports(), _o.getReports())) {
/* 31 */         return false;
      }


/* 35 */       return true;
    }

/* 38 */     return false;
  }


/* 42 */   public Report findReport(String id) { return (Report)this.m_reports.get(id); }


  public Report findOrCreateReport(String id) {
/* 46 */     Report report = (Report)this.m_reports.get(id);

/* 48 */     if (report == null) {
/* 49 */       synchronized (this.m_reports) {
/* 50 */         report = (Report)this.m_reports.get(id);

/* 52 */         if (report == null) {
/* 53 */           report = new Report(id);
/* 54 */           this.m_reports.put(id, report);
        }
      }
    }

/* 59 */     return report;
  }


/* 63 */   public Map<String, Report> getReports() { return this.m_reports; }





  public void mergeAttributes(AllConfig other) {}



/* 80 */   public Report removeReport(String id) { return (Report)this.m_reports.remove(id); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-consumer-3.0.0.jar!/com/dianping/cat/consumer/all/config/entity/AllConfig.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */